# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>

pkgname=kdevelop
pkgver=5.2.4
pkgrel=2
pkgdesc='C++ IDE using KDE technologies'
arch=(x86_64)
url='http://www.kdevelop.org/'
license=(GPL)
depends=(clang libksysguard kitemmodels knotifyconfig ktexteditor grantlee libkomparediff2 qt5-webengine
         kcmutils threadweaver knewstuff)
makedepends=(extra-cmake-modules kdoctools kdevelop-pg-qt llvm qt5-tools plasma-framework krunner okteta boost purpose subversion)
optdepends=('konsole: embedded terminal'
            'git: Git support' 'subversion: SVN support' 'cvs: CVS support'
            'gdb: GNU debugger support' 'lldb: LLDB debugger support'
            'qt5-doc: Qt documentation integration'
            'cmake: cmake integration'
            'qt5-tools: qthelp plugin'
            'okteta: GNU debugger support'
            'plasma-framework: for the plasma addons'
            'purpose: patch review plugin'
            'cppcheck: code analyzer' 'heaptrack: memory profiler' 'kdevelop-clang-tidy: clang-tidy analyzer plugin')
conflicts=(kdevelop-qmljs kdevplatform)
replaces=(kdevelop-qmljs kdevplatform)
source=("https://download.kde.org/stable/$pkgname/$pkgver/src/$pkgname-$pkgver.tar.xz"{,.asc})
sha256sums=('2c3ee424da6b0df06bea48db28abb9a00be9601a5494f026f9cbe704edd173c9'
            'SKIP')
validpgpkeys=('329FD02C5AA48FCC77A4BBF0AC44AC6DB29779E6') # Sven Brauch <mail@svenbrauch.de>

prepare() {
  mkdir -p build
}

build() {
  cd build
  cmake ../$pkgname-$pkgver \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib
  make
}

package() {
  cd build
  make DESTDIR="$pkgdir" install
}
